<script type="text/javascript" src="js/tasks.js"></script>

<h2>Listado de tareas activas</h2>
<ul id="tasks-list">
<?php foreach ($this->tasks as $T) : ?>
	<li><?=$T->task_title?></li>
<?php endforeach; ?>
</ul>

<a href="#" onclick="task_new_cancel(); $('#task-new')[0].task_title.focus(); return false;">nueva tarea</a>
<form id="task-new" action="/tasks/new" method="post" onsubmit="return task_new(this);" style="display:none;">
<fieldset>
	<legend>Título</legend>
	<input type="text" name="task_title" />
	
	<select name="task_status">
	<?php foreach ($this->task_status as $S) : ?>
		<option><?=$S?></option>
	<?php endforeach; ?>
	</select>
</fieldset>
<fieldset>
	<input type="submit" value="Añadir" />
	<input type="button" value="Cancelar" onclick="task_new_cancel();" />
</fieldset>
</form>